A real-time clock or “RTC” is a unit or module such as an Integrated Circuit (IC) that tracks time continuously whether the host system is powered or not. RTCs are typically powered by a dedicated back-up battery or other power source to provide a real-time clock value that indicates, e.g., day, date, and time. RTCs are used, for example, in personal computers, personal digital assistants (PDAs), cellular telephones, and other devices that track time.
Referring to FIG. 1A, one known RTC component, such as a RTC chip or IC 10, includes an oscillator 11, a counter 12, a processor 13, a temperature sensor 14 and a memory 15. A battery 16 provides power to the chip 10 components. One known oscillator 11 includes a crystal, e.g., a quartz crystal, an inverting amplifier, capacitors, resistors, and a Schmitt trigger. The output of the oscillator 11 is provided to the counter 12, the contents of which are incremented by the output of the oscillator 11 to count the number of pulses generated by the oscillator 11. The processor 13 is coupled to the counter 12 and provides an adjustment signal 16 to the counter 12.
More particularly, the processor 13 obtains temperature data from a temperature sensor, thermocouple, or thermistor 14 and refers to memory 15, which stores a temperature compensation formula or lookup table 20, e.g., a generic formula or table that applies to multiple oscillators 11, that is used to calculate an estimated counting error based on the actual temperature. If an error exists, the processor 13 sends the counter 12 an adjustment signal 16 (based on the generic or custom formula 20) to compensate for temperature effects on the output of the oscillator 11. For certain RTC chips 10, there may be at least three sources of timing errors: offset error, temperature error, and aging error.
Offset error is the difference between the expected frequency of the output of the RTC chip 10 and the actual frequency of the output of the RTC chip 10. RTCs often include a quartz oscillator 11 having a nominal or nameplate frequency. One known nameplate frequency is 32.768 kHz or 32,768 Hz (cycles or pulses or counts per second). Thus, a “32,768 Hz oscillator” is designed and expected to output a signal of a frequency of 32,768 Hz. The oscillator 11, however, may not be properly adjusted or designed resulting in oscillator variations and inaccuracies. Consequently, the actual or measured frequency of the oscillator 11 may differ from the expected 32,768 Hz frequency.
For example, if the nominal frequency of an oscillator 11 is 32,768 Hz, the actual frequency may be, e.g., 32,771.990629 Hertz. The period of each pulse of the oscillator 11 output is expressed as the inverse of the frequency or, in this example, 1/32771.990629=30.5138620146894 micro-seconds. This offset results in inaccurate timekeeping and a timing error of about 320 seconds per month, calculated as follows:Error (ppm)=1,000,000*(measured frequency−nominal frequency)/(nominal frequency), wherein “ppm” is “parts per million,”Seconds per month=(60 seconds per minute)*(60 minutes per hour)*(24 hours per day)*(365 days per year)/(12 months per year)=2,628,000 seconds per month,1 ppm in seconds per month=(seconds per month)/1,000,000=2.628 seconds, andSeconds per month error=(error in ppm)*(2.628 seconds per ppm)=121.784*2.628=320.049 seconds per month.An error of 320 seconds per month due to frequency offset can be particularly problematic when multiplied over a number of months and years.
Certain oscillators include adjustment mechanisms to compensate for temperature variations. For example, as shown in FIG. 1, each RTC chip 10 supplied by a manufacturer may be programmed with the same generic temperature compensation formula 20 at the time of manufacture or programming. Thus, the same formula 20 may apply to all of the oscillators 11 on all of the chips 10 supplied by a manufacturer. An example of a generic temperature compensation formula 20 that is used to calculate the error resulting from temperature variations of a 32,768 Hz crystal oscillator is Error=ΔF/F=K*(T−T0)2 where “T” is the measured or actual temperature, “F” is the frequency. “ΔF” is the change in frequency, “K”=−0.036 ppm/° C.2±0.006 ppm/° C.2 and T0=25° C.±5° C.
Referring to FIG. 1B, it is also known to perform calibration tests to determine how the output of an oscillator 11 varies with temperature, e.g., to determine a formula that applies to one, some, or all of the oscillators 11. For this purpose, one known calibration system 20 includes an environmental chamber 22, a frequency counter or detector 24, an off-chip, i.e., external, temperature measurement element 26, and a frequency source 28. During calibration, the frequency source 28 is coupled to the chip(s) 10 in the environmental chamber 20. The temperature inside the chamber 22 is cycled through a series of different temperatures, and the frequency of the output of the oscillator 11 is determined at each temperature, as determined by the frequency counter 24 and the off-chip or external temperature measurement element 26. The temperature variations can then be compiled as a look-up table or reflected as a temperature compensation formula.
While such calibration systems 20 may have been used with some effectiveness in the past, temperature measurements using an off-chip or external temperature measurement element 26 introduce undesirable temperature measurement errors that lead to counting and timing inaccuracies. Further, all oscillators 11 are not the same and require different adjustments. Thus, a generic temperature compensation formula 20 may be acceptable to compensate some oscillators 11, but not all oscillators 11. As a result, a programmed generic formula 20 is not suitable for all oscillators 11, and may also introduce undesirable counting and timing errors into those oscillators 11 that require different or more robust compensation.
Frequency variations may also result from “aging” or internal changes in the oscillator 11 over time. For example, the crystal material of the oscillator 11 may change or the crystal material or structure may change. One or more of these “aging” factors may result in the oscillator 11 frequency changing over time, thereby resulting in deviations from the expected frequency over time. Aging errors may be computed if an appropriate formula is developed or supplied by the manufacturer of the RTC chip 10.
Even if frequency offset and frequency variations caused by temperature and aging can be compensated to some degree, to count exactly one second of time, exactly 32,771.990629 oscillations (in the above example) must be counted to count one second. Known RTC chips 10, however, may not be able to count a fraction of a single oscillation, thereby resulting in some amount of error. Further, certain systems may attempt to compensate for one cause of frequency variations, e.g., temperature, but may not be capable of addressing multiple sources of frequency variations.
Accordingly, it would be desirable to be able to compensate for offset, temperature and/or aging in a more accurate and reliable manner. Further, it may be desirable to achieve these improvements as part of an integrated solution that does not require an off-chip or external temperature measurement element. Additionally, it may be desirable to program RTC chips with customized temperature compensation profiles to achieve higher degrees of accuracy.